const routes = [
  {
    path: "/",
    component: () => import("../views/layout/Layout.vue"),
    children: [
      {
        path: "/",
        meta: {
          title: "首页",
        },
        component: () => import("../views/Index.vue"),
      },
      {
        path: "/goods/list",
        meta: {
          title: "选品入库",
        },
        component: () => import("../views/Selection.vue"),
      },
      {
        path: "/selection/list",
        meta: {
          title: "选品入库",
        },
        component: () => import("../views/Selection.vue"),
      },
      {
        path: "/commodity/list",
        meta: {
          title: "商品列表",
        },
        component: () => import("../views/Commodity.vue"),
      },
      {
        path: "/commodity/detail",
        meta: {
          title: "商品详情",
        },
        component: () => import("../views/commodityDetail.vue"),
      },
      {
        path: "/category/list",
        meta: {
          title: "分类列表",
        },
        component: () => import("../views/Category.vue"),
      },
      {
        path: "/order/list",
        meta: {
          title: "订单管理",
        },
        component: () => import("../views/Order.vue"),
      },
      {
        path: "/detail",
        meta: {
          title: "订单详情",
        },
        component: () => import("../views/order/orderDetail.vue"),
      },
      {
        path: "/sale/list",
        meta: {
          title: "售后管理",
        },
        component: () => import("../views/Sale.vue"),
      },
      {
        path: "/sale/details",
        meta: {
          title: "售后详情",
        },
        component: () => import("../views/states/Details.vue"),
      },
      {
        path: "/index/details",
        meta: {
          title: "收益详情",
        },
        component: () => import("../views/Details.vue"),
      },
      {
        path: "/finance/list",
        meta: {
          title: "财务管理",
        },
        component: () => import("../views/Finance.vue"),
      },
      {
        path: "/user/list",
        meta: {
          title: "用户管理",
        },
        component: () => import("../views/UserManagement.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    meta: {
      title: "登录页",
    },
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    meta: {
      title: "404",
    },
    component: () => import("../views/NotFound.vue"),
  },
];

export default routes;
